Skip to content

Sonar: three findings from the first CI scan (S2871, S8786) - #3

Merged
dylanmtaylor merged 1 commit into
mainfrom
sonar/ci-scan-followups
Nov 11, 2026
Merged

dylanmtaylor merged 1 commit into
mainfrom
sonar/ci-scan-followups

Conversation

@dylanmtaylor

Copy link
Copy Markdown
Member

The first CI-based SonarCloud scan (#2) found three issues that automatic analysis didn't report:

  • typescript:S2871 routes/health.ts: oldestQueued sorted numbers with the default .sort(), which compares them as strings. That was right only while every timestamp had the same number of digits. It's now (a, b) => a - b.
  • typescript:S2871 db/migrate.ts: migration file names are sorted with an explicit code-unit compare, the order .sort() already used, so migrations apply in the same order.
  • typescript:S8786 triage/knowledge-writer.ts cleanDoc: trailing spaces and tabs are trimmed by a loop (trimEndSpaces) instead of /[ \t]+$/.

npm run typecheck and the full vitest suite (434 tests) pass. CI runs both through the SonarCloud workflow.

Still open on purpose: jssecurity:S5696 / S8475 in public/app.js (the alert dock's sessionStorage cache; see #1). Mark them Safe in SonarCloud, or decide to drop the instant re-show.

@dylanmtaylor
dylanmtaylor merged commit 7f2a7ad into main Nov 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant